<template>
    <div class="add-good">
        <el-button type="primary" @click="addchange">添加</el-button>
        <div class="add-good-item" :class="{addactive: !isadd}"> 
            <div class="add-head" >
                <div class="add-h3">
                    <h3>添加商品</h3>
                </div>
                <span @click="addchange">x</span>
            </div>
        </div>
    </div>
      
</template>

<script>
// import {
//   StarFilled
// } from '@element-plus/icons-vue' 

export default {
    name: 'addgood',
    components: {
        // StarFilled
    },
    data() {
        return {
            isadd: false
        }
    },
    methods: {
        addchange() {
            this.isadd = !this.isadd
        }
    },
    
}
</script>

<style scoped>
.add-good {
    float: right;
    margin-top: -40px;
    margin-right: 10px;
}
.el-button {
    width: 100px;
    height: 45px;
}
.add-good-item {
    width: 800px;
    height: 500px;
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translateX(-50%);
    transform: translateY(-50%);
    border-radius: 10px;
    box-shadow: 1px 1px 3px #ccc;
}
.add-head {
    display: flex;
    width: 100%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-bottom:1px solid #ccc;
}
.add-h3 {
    display: inline-block;
    width: 750px;
    height: 50px;
    background-color: #fff;
}
.add-head span {
    /* float: right; */
    width: 50px;
    display: inline-block;
    background-color: #fff;
    font-size: 20px;
    
}
.add-head span:hover {
    background-color: rgb(221, 221, 221);
    color: #fff;
}
.addactive {
    display: none;
}
</style>